package com.yidu.utils;

/**
 * <p>@Description: 信息工具类</p>
 * <p>@author Wen Xiang</p>
 * <p>@Date: 2021/1/13</p>
 * <p>@Time: 10:27</p>
 */
public class BassMessage {
    private String msg;
    private String state;
    private Object data;

    /**
     * 操作成功
     * @param data
     * @return
     */
    public static BassMessage ok(Object data){
        BassMessage ba = new BassMessage();
        ba.setData(data);
        ba.setMsg("操作成功！！！");
        ba.setState("1");
        return ba;
    }

    /**
     * 重载  无参的
     * @return
     */
    public static BassMessage ok(){
        BassMessage ba = new BassMessage();
        ba.setMsg("操作成功！！！");
        ba.setState("1");
        return ba;
    }

    /**
     * 失败的
     * @return
     */
    public static BassMessage no(){
        BassMessage ba = new BassMessage();
        ba.setMsg("操作失败！！！");
        ba.setState("0");
        return ba;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
